This folder contains the data and code necessary for replicating the results for "No Easy Way Out: The Effect of Military Coups on State Repression."


## REPLICATION CODE
#############

"rAnalysis.r"
	- Produces the tables and figures in the main text

"rAnalysisAppendix.r" 
	- Produces the tables and figures in the appendix

"eba_bsc_A.py"
	- Computes regression outputs for the extreme bounds analysis using the Belkin and Schofer version of the coup data ("ts_bsc.csv" file)
	- Saves results to folder /eba.out.bscA in the working directory (this folder must be created by the user).

"eba_bsc_B.py"
	- Computes marginal effects for different pre-treatment levels of state repression for the extreme bounds analysis using the Belkin and Schofer coup data ("ts_bsc.csv" file).
	- Saves results to folder /eba.out.bscB in the working directory (this folder must be created by the user). 

"eba_pth_A.py"
	- Computes regression outputs for the extreme bounds analysis using the Powell and Thyne coup data ("ts_pth.csv" file)
	- Saves results to folder /eba.out.pthA in the working directory (this folder must be created by the user). 

"eba_pth_B.py"
	- Computes marginal effects for different pre-treatment levels of state repression for the extreme bounds analysis using the Powell and Thyne Coup data (see "ts_pth.csv" file)
	- Saves results to folder /eba.out.bscB in the working directory (this folder must be created by the user). 

"eba_bsc_A"
- Creates Figure 5 and Table A4. Must run eba_bsc_A.py first.

"eba_bsc_B"
- Creates Table A5. Must run eba_bsc_B.py first.

"eba_pth_A"
- Creates Table B2. Must run eba_pth_A.py first.

"eba_pth_BB"
- Creates Table B3. Must run eba_pth_A.py first.


## DATA FILES
#############

The R dataset "data.rData" contains the following data frames:

"dat"
- Coup dataset (based on Belkin and Schofer). 
- An observation is a coup attempt 

"dat_mi" 
- Multiple imputation (80 replicates) of the coup dataset (based on Belkin and Schofer)
- An observation is a coup attempt 

"diff_dat"
- Differenced dataset (based on Belkin and Schofer)
- An observation is a country-year that experienced at least one coup attempt. Coup attempts that occurred in consecutive calendar years count as one observation.

"diff_dat_mi"
- Multiple imputation (80 replicates) of the differenced dataset (based on Belkin and Schofer)
- An observation is a country-year during which at least one coup attempt occurred. Coup attempts that occur in consecutive calendar years count as one observation  

"diff_dat_pth"
- Differenced dataset (based on Powell and Thyne v2017)
- An observation is a country-year during which at least one coup attempt occurred. Coup attempts that occur in consecutive calendar years count as one observation  

"diff_dat_pth_mi"
- Multiple imputation (80 replicates) of the differenced dataset (using Powell and Thyne v2017)
- An observation is a country-year during which at least one coup attempt occurred. Coup attempts that occur in consecutive calendar years count as one observation

"D_rch"
- Time-series coup data from Archigos
- An observation is a country-year

